package cn.yuanqiao.archive.statistics.domain;

import cn.yuanqiao.common.annotation.Excel;
import cn.yuanqiao.common.annotation.IdAnnotation;
import cn.yuanqiao.common.exception.ServiceException;
import cn.yuanqiao.common.utils.StringUtils;
import cn.yuanqiao.common.core.domain.BaseEntity;
import cn.yuanqiao.common.utils.SecurityUtils;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * 年报统计对象 BJYQ_YQ_YEARREPORT
 * 
 * @author xy
 * @date 2023-07-28
 */
public class YearReport extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    private final String BIGTABLENAME = "_YQ_YEARREPORT";

    public YearReport() {
        String tenantCode = SecurityUtils.getTenantCode();
        if(StringUtils.isEmpty(tenantCode)){
            throw new ServiceException("tenantCode is null");
            //  this.tableName="YQ_YEARREPORT";
        }else {
            this.tableName = tenantCode.toUpperCase()+BIGTABLENAME;
        }
    }

    /** id */
    @IdAnnotation
    private Long id;

    /** 年份 */
    @Excel(name = "年份")
    private String year;

    /** 内容 */
    @Excel(name = "内容")
    private String contents;

    /** 创建人 */
    @Excel(name = "创建人")
    private Long createId;

    private String tableName;

    /** 创建人 */
    @Excel(name = "类型")
    private String type;


    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId()
    {
        return id;
    }
    public void setYear(String year)
    {
        this.year = year;
    }

    public String getYear()
    {
        return year;
    }
    public void setContents(String contents)
    {
        this.contents = contents;
    }

    public String getContents()
    {
        return contents;
    }
    public void setCreateId(Long createId)
    {
        this.createId = createId;
    }

    public Long getCreateId()
    {
        return createId;
    }

    public String getTableName() {
        return tableName;
    }

    public void setTableName(String tableName) {
        this.tableName = tableName;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    @Override
    public String toString() {
        return "YearReport{" +
                "BIGTABLENAME='" + BIGTABLENAME + '\'' +
                ", id=" + id +
                ", year='" + year + '\'' +
                ", contents='" + contents + '\'' +
                ", createId=" + createId +
                ", tableName='" + tableName + '\'' +
                ", type='" + type + '\'' +
                '}';
    }
}
